<template>
  <view class="content">
    <image class="logo" src="/static/logo.png" mt-5 />
    <view class="text-area">
      <text class="title">{{ title }}</text>
    </view>
  </view>
</template>

<script setup lang="ts">
import { getRect } from '@/utils/uniUtil'
import { getCurrentInstance } from 'vue'
const title = ref('大家好我是爽公子')

onMounted(() => {
  uni.$u.toast('hi')
  const { ctx } = getCurrentInstance() as any
  nextTick(() => {
    getRect(ctx, '.text-area').then((res: any) => {
      console.log(res)
    })
  })
})
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin: 200rpx auto 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
